<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');


$config = array(
	'menu' => array(
		/*array(
			'field' => 'p_name',
			'label' => '!',
			'rules' => 'trim|required'
		),*/
		array(
			'field' => 'p_type',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_key_id',
			'label' => '!',
			'rules' => 'trim|required'
		),/*
		array(
			'field' => 'p_key',
			'label' => '!',
			'rules' => 'trim|required'
		),*/ 
		array(
			'field' => 'p_target_window',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_parent_id',
			'label' => '!',
			'rules' => 'trim|required'
		) ,
		array(
			'field' => 'p_order',
			'label' => '!',
			'rules' => 'trim|required'
		) ,
		array(
			'field' => 'p_menu_name',
			'label' => '!',
			'rules' => 'trim|required'
		)
	),
	'page' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_content',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_class_id',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_part_template',
			'label' => '!',
			'rules' => 'trim'
		),	
		array(
			'field' => 'p_alias',
			'label' => '!',
			'rules' => 'trim|required'
		),
	),
	'guest_book' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_contacter',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_contacter_phone',
			'label' => '!',
			'rules' => 'trim|required'
		),
        /*
		array(
			'field' => 'p_contacter_mobilephone',
			'label' => '!',
			'rules' => 'trim|required|callback_contacter_mobilephone_check'
		),*/
		array(
			'field' => 'p_contacter_email',
			'label' => '!',
			'rules' => 'trim|valid_email'
		),
		array(
			'field' => 'p_content',
			'label' => '!',
			'rules' => 'trim|required'
		)
	),
	'link' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_url',
			'label' => '!',
			'rules' => 'trim|required'
		),	
		array(
			'field' => 'p_image',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_profile',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_class_id',
			'label' => '!',
			'rules' => 'trim|required'
		)
	), 
	'article_class' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
        array(
            'field' => 'p_alias',
            'label' => '!',
            'rules' => 'trim|required'
        ),
        array(
            'field' => 'p_page_size',
            'label' => '!',
            'rules' => 'trim|required'
        ),
		array(
			'field' => 'p_parent_id',
			'label' => '!',
			'rules' => 'trim|required'
		) 
	),
    'link_class' => array(
            array(
                    'field' => 'p_title',
                    'label' => '!',
                    'rules' => 'trim|required'
            ),
            array(
                    'field' => 'p_alias',
                    'label' => '!',
                    'rules' => 'trim|required'
            ),
            array(
                    'field' => 'p_parent_id',
                    'label' => '!',
                    'rules' => 'trim|required'
            )
    ),
	'page_class' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_alias',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_parent_id',
			'label' => '!',
			'rules' => 'trim|required'
		) 
	),
	'article' => array(
		array(
			'field' => 'p_title',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_content',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_from', 
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_author',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_click_count',
			'label' => '!',
			'rules' => 'trim|required|integer'
		),
		array(
			'field' => 'p_class_id',
			'label' => '!',
			'rules' => 'trim|required'
		)
	),
	'site_info' => array(
		array(
			'field' => 'p_name',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_url',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_address',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_contacter',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_email',   
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_phone',
			'label' => '!',
			'rules' => 'trim'
		),
		array( 
			'field' => 'p_mobile_phone',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_copy_right',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_icp',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_is_close',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_close_reason',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_third_js',
			'label' => '!',
			'rules' => 'trim'
		),
	),
	'user' => array(
		array(
			'field' => 'p_name',
			'label' => '!',
			'rules' => 'trim|required|callback_check_username'
		),
		array(
			'field' => 'p_nickname',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_phone',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_qq',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_usergroup_id',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_email',
			'label' => '!',
			'rules' => 'valid_email'
		),
	),
	'selfinfo' => array(
		array(
			'field' => 'p_nickname',
			'label' => '!',
			'rules' => 'trim|required'
		),
		array(
			'field' => 'p_phone',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_qq',
			'label' => '!',
			'rules' => 'trim'
		),
		array(
			'field' => 'p_email',
			'label' => '!',
			'rules' => 'valid_email'
		),
	),
	'usergroup'=>array(
		array(
				'field' => 'p_name',
				'label' => '!',
				'rules' => 'trim|required|callback_check_groupname'
		)
	)
);

?>